{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "12 和 18 的最小公倍数是 36\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "def lcm(a, b):\n",
    "\t# gcd 公约数\n",
    "    return abs(a * b) // math.gcd(a, b)\n",
    "\n",
    "# 示例\n",
    "num1 = 12\n",
    "num2 = 18\n",
    "print(f\"{num1} 和 {num2} 的最小公倍数是 {lcm(num1, num2)}\")\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1*1=1\n",
      "1*2=2 2*2=4\n",
      "1*3=3 2*3=6 3*3=9\n",
      "1*4=4 2*4=8 3*4=12 4*4=16\n",
      "1*5=5 2*5=10 3*5=15 4*5=20 5*5=25\n",
      "1*6=6 2*6=12 3*6=18 4*6=24 5*6=30 6*6=36\n",
      "1*7=7 2*7=14 3*7=21 4*7=28 5*7=35 6*7=42 7*7=49\n",
      "1*8=8 2*8=16 3*8=24 4*8=32 5*8=40 6*8=48 7*8=56 8*8=64\n",
      "1*9=9 2*9=18 3*9=27 4*9=36 5*9=45 6*9=54 7*9=63 8*9=72 9*9=81\n"
     ]
    }
   ],
   "source": [
    "# l = [\"\"for i in range(1,10) for j in range(1,i+1)]\n",
    "print(\"\\n\".join([\" \".join([\"{}*{}={}\".format(x, y, x*y) for x in range(1,y+1)]) for y in range(1,10)]))\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1728545121 1728545114486 44\n",
      "1728545115 1728545114486 -36\n",
      "1728545115 1728545114486 3\n",
      "1728545117 1728545114486 -7\n",
      "1728545122 1728545114486 18\n",
      "1728545118 1728545114486 31\n",
      "1728545122 1728545114486 -20\n",
      "1728545124 1728545114486 35\n",
      "1728545118 1728545114486 40\n",
      "1728545117 1728545114486 49\n"
     ]
    }
   ],
   "source": [
    "import random\n",
    "import time\n",
    "for i in range(10):\n",
    "\tc = int(time.time())+random.randint(1,10)\n",
    "\tt = random.randint(-50,50)\n",
    "\td = int(time.time()*1000)\n",
    "\tprint(c,d,t)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "outputs": [],
   "source": [
    "import pandas  as pd\n",
    "import matplotlib.pyplot as plt\n",
    "from sklearn.ensemble import RandomForestClassifier\n",
    "from sklearn.linear_model import LogisticRegression\n",
    "from sklearn.metrics import accuracy_score\n",
    "plt.rcParams[\"font.sans-serif\"] = [\"SimHei\"]\n",
    "plt.rcParams[\"axes.unicode_minus\"] = False\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "outputs": [
    {
     "data": {
      "text/plain": "     Unnamed: 0               event_time             order_id  \\\n0             0  2020-04-24 11:50:39 UTC  2294359932054536986   \n1             1  2020-04-24 11:50:39 UTC  2294359932054536986   \n2             2  2020-04-24 14:37:43 UTC  2294444024058086220   \n3             3  2020-04-24 14:37:43 UTC  2294444024058086220   \n4             4  2020-04-24 19:16:21 UTC  2294584263154074236   \n..          ...                      ...                  ...   \n995         995  2020-05-01 06:13:19 UTC  2299263580689662910   \n996         996  2020-05-01 06:14:11 UTC  2299264013382452202   \n997         997  2020-05-01 06:15:29 UTC  2299264670051074093   \n998         998  2020-05-01 06:16:16 UTC  2299265061060870223   \n999         999  2020-05-01 06:16:45 UTC  2299265304112398434   \n\n              product_id   category_id                category_code     brand  \\\n0    1515966223509089906  2.268105e+18           electronics.tablet   samsung   \n1    1515966223509089906  2.268105e+18           electronics.tablet   samsung   \n2    2273948319057183658  2.268105e+18  electronics.audio.headphone    huawei   \n3    2273948319057183658  2.268105e+18  electronics.audio.headphone    huawei   \n4    2273948316817424439  2.268105e+18                          NaN   karcher   \n..                   ...           ...                          ...       ...   \n995  1515966223509259066  2.268105e+18    appliances.kitchen.washer      beko   \n996  1515966223509127712  2.268105e+18     computers.network.router  mercusys   \n997  1515966223509088532  2.268105e+18       electronics.smartphone   samsung   \n998  1515966223509088671  2.268105e+18       electronics.smartphone     apple   \n999  1515966223509108006  2.268105e+18       electronics.smartphone    xiaomi   \n\n      price       user_id   age sex local  \n0    162.01  1.515916e+18  24.0   女    海南  \n1    162.01  1.515916e+18  24.0   女    海南  \n2     77.52  1.515916e+18  38.0   女    北京  \n3     77.52  1.515916e+18  38.0   女    北京  \n4    217.57  1.515916e+18  32.0   女    广东  \n..      ...           ...   ...  ..   ...  \n995  203.68  1.515916e+18  49.0   男    广东  \n996   16.88  1.515916e+18  24.0   男    广东  \n997  300.90  1.515916e+18  28.0   女    北京  \n998  925.67  1.515916e+18  20.0   男    上海  \n999  110.86  1.515916e+18  37.0   女    湖南  \n\n[1000 rows x 12 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Unnamed: 0</th>\n      <th>event_time</th>\n      <th>order_id</th>\n      <th>product_id</th>\n      <th>category_id</th>\n      <th>category_code</th>\n      <th>brand</th>\n      <th>price</th>\n      <th>user_id</th>\n      <th>age</th>\n      <th>sex</th>\n      <th>local</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>0</td>\n      <td>2020-04-24 11:50:39 UTC</td>\n      <td>2294359932054536986</td>\n      <td>1515966223509089906</td>\n      <td>2.268105e+18</td>\n      <td>electronics.tablet</td>\n      <td>samsung</td>\n      <td>162.01</td>\n      <td>1.515916e+18</td>\n      <td>24.0</td>\n      <td>女</td>\n      <td>海南</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>1</td>\n      <td>2020-04-24 11:50:39 UTC</td>\n      <td>2294359932054536986</td>\n      <td>1515966223509089906</td>\n      <td>2.268105e+18</td>\n      <td>electronics.tablet</td>\n      <td>samsung</td>\n      <td>162.01</td>\n      <td>1.515916e+18</td>\n      <td>24.0</td>\n      <td>女</td>\n      <td>海南</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>2</td>\n      <td>2020-04-24 14:37:43 UTC</td>\n      <td>2294444024058086220</td>\n      <td>2273948319057183658</td>\n      <td>2.268105e+18</td>\n      <td>electronics.audio.headphone</td>\n      <td>huawei</td>\n      <td>77.52</td>\n      <td>1.515916e+18</td>\n      <td>38.0</td>\n      <td>女</td>\n      <td>北京</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>3</td>\n      <td>2020-04-24 14:37:43 UTC</td>\n      <td>2294444024058086220</td>\n      <td>2273948319057183658</td>\n      <td>2.268105e+18</td>\n      <td>electronics.audio.headphone</td>\n      <td>huawei</td>\n      <td>77.52</td>\n      <td>1.515916e+18</td>\n      <td>38.0</td>\n      <td>女</td>\n      <td>北京</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>4</td>\n      <td>2020-04-24 19:16:21 UTC</td>\n      <td>2294584263154074236</td>\n      <td>2273948316817424439</td>\n      <td>2.268105e+18</td>\n      <td>NaN</td>\n      <td>karcher</td>\n      <td>217.57</td>\n      <td>1.515916e+18</td>\n      <td>32.0</td>\n      <td>女</td>\n      <td>广东</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>995</th>\n      <td>995</td>\n      <td>2020-05-01 06:13:19 UTC</td>\n      <td>2299263580689662910</td>\n      <td>1515966223509259066</td>\n      <td>2.268105e+18</td>\n      <td>appliances.kitchen.washer</td>\n      <td>beko</td>\n      <td>203.68</td>\n      <td>1.515916e+18</td>\n      <td>49.0</td>\n      <td>男</td>\n      <td>广东</td>\n    </tr>\n    <tr>\n      <th>996</th>\n      <td>996</td>\n      <td>2020-05-01 06:14:11 UTC</td>\n      <td>2299264013382452202</td>\n      <td>1515966223509127712</td>\n      <td>2.268105e+18</td>\n      <td>computers.network.router</td>\n      <td>mercusys</td>\n      <td>16.88</td>\n      <td>1.515916e+18</td>\n      <td>24.0</td>\n      <td>男</td>\n      <td>广东</td>\n    </tr>\n    <tr>\n      <th>997</th>\n      <td>997</td>\n      <td>2020-05-01 06:15:29 UTC</td>\n      <td>2299264670051074093</td>\n      <td>1515966223509088532</td>\n      <td>2.268105e+18</td>\n      <td>electronics.smartphone</td>\n      <td>samsung</td>\n      <td>300.90</td>\n      <td>1.515916e+18</td>\n      <td>28.0</td>\n      <td>女</td>\n      <td>北京</td>\n    </tr>\n    <tr>\n      <th>998</th>\n      <td>998</td>\n      <td>2020-05-01 06:16:16 UTC</td>\n      <td>2299265061060870223</td>\n      <td>1515966223509088671</td>\n      <td>2.268105e+18</td>\n      <td>electronics.smartphone</td>\n      <td>apple</td>\n      <td>925.67</td>\n      <td>1.515916e+18</td>\n      <td>20.0</td>\n      <td>男</td>\n      <td>上海</td>\n    </tr>\n    <tr>\n      <th>999</th>\n      <td>999</td>\n      <td>2020-05-01 06:16:45 UTC</td>\n      <td>2299265304112398434</td>\n      <td>1515966223509108006</td>\n      <td>2.268105e+18</td>\n      <td>electronics.smartphone</td>\n      <td>xiaomi</td>\n      <td>110.86</td>\n      <td>1.515916e+18</td>\n      <td>37.0</td>\n      <td>女</td>\n      <td>湖南</td>\n    </tr>\n  </tbody>\n</table>\n<p>1000 rows × 12 columns</p>\n</div>"
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.read_csv(\"C:\\\\Users\\\\Administrator\\\\Desktop\\\\Python数据分析\\\\月考题\\\\大数据 大数据系 专高5 《Python数据分析EDA》月考题库（修改2）\\\\3-2 大数据 大数据系 专高5 《Python数据分析EDA》月考题库（新建）-已入库\\\\3-2 大数据 大数据系 专高5 《Python数据分析EDA》月考题库（新建）-已入库\\\\02-02-5-00007\\\\附件\\\\数据源\\\\电子产品销售分析.csv\")\n",
    "df = df[:1000]\n",
    "df"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "outputs": [
    {
     "data": {
      "text/plain": "        Unnamed: 0      order_id    product_id   category_id        price  \\\ncount  1000.000000  1.000000e+03  1.000000e+03  1.000000e+03  1000.000000   \nmean    499.500000  2.298509e+18  1.682747e+18  2.271408e+18   120.024950   \nstd     288.819436  5.341548e+14  3.141955e+17  1.772696e+16   199.793237   \nmin       0.000000  2.294360e+18  1.515966e+18  2.268105e+18     0.020000   \n25%     249.750000  2.298236e+18  1.515966e+18  2.268105e+18    15.020000   \n50%     499.500000  2.298594e+18  1.515966e+18  2.268105e+18    41.180000   \n75%     749.250000  2.298773e+18  1.515966e+18  2.268105e+18   138.870000   \nmax     999.000000  2.299265e+18  2.298437e+18  2.374499e+18  1433.540000   \n\n            user_id          age  \ncount  1.000000e+03  1000.000000  \nmean   1.515916e+18    32.706000  \nstd    7.989943e+06     9.463886  \nmin    1.515916e+18    16.000000  \n25%    1.515916e+18    25.000000  \n50%    1.515916e+18    33.000000  \n75%    1.515916e+18    40.000000  \nmax    1.515916e+18    50.000000  ",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Unnamed: 0</th>\n      <th>order_id</th>\n      <th>product_id</th>\n      <th>category_id</th>\n      <th>price</th>\n      <th>user_id</th>\n      <th>age</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>count</th>\n      <td>1000.000000</td>\n      <td>1.000000e+03</td>\n      <td>1.000000e+03</td>\n      <td>1.000000e+03</td>\n      <td>1000.000000</td>\n      <td>1.000000e+03</td>\n      <td>1000.000000</td>\n    </tr>\n    <tr>\n      <th>mean</th>\n      <td>499.500000</td>\n      <td>2.298509e+18</td>\n      <td>1.682747e+18</td>\n      <td>2.271408e+18</td>\n      <td>120.024950</td>\n      <td>1.515916e+18</td>\n      <td>32.706000</td>\n    </tr>\n    <tr>\n      <th>std</th>\n      <td>288.819436</td>\n      <td>5.341548e+14</td>\n      <td>3.141955e+17</td>\n      <td>1.772696e+16</td>\n      <td>199.793237</td>\n      <td>7.989943e+06</td>\n      <td>9.463886</td>\n    </tr>\n    <tr>\n      <th>min</th>\n      <td>0.000000</td>\n      <td>2.294360e+18</td>\n      <td>1.515966e+18</td>\n      <td>2.268105e+18</td>\n      <td>0.020000</td>\n      <td>1.515916e+18</td>\n      <td>16.000000</td>\n    </tr>\n    <tr>\n      <th>25%</th>\n      <td>249.750000</td>\n      <td>2.298236e+18</td>\n      <td>1.515966e+18</td>\n      <td>2.268105e+18</td>\n      <td>15.020000</td>\n      <td>1.515916e+18</td>\n      <td>25.000000</td>\n    </tr>\n    <tr>\n      <th>50%</th>\n      <td>499.500000</td>\n      <td>2.298594e+18</td>\n      <td>1.515966e+18</td>\n      <td>2.268105e+18</td>\n      <td>41.180000</td>\n      <td>1.515916e+18</td>\n      <td>33.000000</td>\n    </tr>\n    <tr>\n      <th>75%</th>\n      <td>749.250000</td>\n      <td>2.298773e+18</td>\n      <td>1.515966e+18</td>\n      <td>2.268105e+18</td>\n      <td>138.870000</td>\n      <td>1.515916e+18</td>\n      <td>40.000000</td>\n    </tr>\n    <tr>\n      <th>max</th>\n      <td>999.000000</td>\n      <td>2.299265e+18</td>\n      <td>2.298437e+18</td>\n      <td>2.374499e+18</td>\n      <td>1433.540000</td>\n      <td>1.515916e+18</td>\n      <td>50.000000</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.describe()\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "outputs": [],
   "source": [
    "# df[\"price\"].isnull().sum()\n",
    "df[\"price\"].fillna(df[\"price\"].mean(),inplace=True)\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "outputs": [
    {
     "data": {
      "text/plain": "Unnamed: 0       False\nevent_time       False\norder_id         False\nproduct_id       False\ncategory_id      False\ncategory_code    False\nbrand            False\nprice            False\nuser_id          False\nage              False\nsex              False\nlocal            False\ndtype: bool"
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.isnull().sum()\n",
    "df.isnull().any()"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "outputs": [],
   "source": [
    "df[\"category_code\"].fillna(\"missing\",inplace=True)\n",
    "df[\"brand\"].fillna(\"missing\",inplace=True)\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "outputs": [
    {
     "data": {
      "text/plain": "     Unnamed: 0               event_time             order_id  \\\n0             0  2020-04-24 11:50:39 UTC  2294359932054536986   \n1             1  2020-04-24 11:50:39 UTC  2294359932054536986   \n2             2  2020-04-24 14:37:43 UTC  2294444024058086220   \n3             3  2020-04-24 14:37:43 UTC  2294444024058086220   \n4             4  2020-04-24 19:16:21 UTC  2294584263154074236   \n..          ...                      ...                  ...   \n995         995  2020-05-01 06:13:19 UTC  2299263580689662910   \n996         996  2020-05-01 06:14:11 UTC  2299264013382452202   \n997         997  2020-05-01 06:15:29 UTC  2299264670051074093   \n998         998  2020-05-01 06:16:16 UTC  2299265061060870223   \n999         999  2020-05-01 06:16:45 UTC  2299265304112398434   \n\n              product_id   category_id                category_code     brand  \\\n0    1515966223509089906  2.268105e+18           electronics.tablet   samsung   \n1    1515966223509089906  2.268105e+18           electronics.tablet   samsung   \n2    2273948319057183658  2.268105e+18  electronics.audio.headphone    huawei   \n3    2273948319057183658  2.268105e+18  electronics.audio.headphone    huawei   \n4    2273948316817424439  2.268105e+18                      missing   karcher   \n..                   ...           ...                          ...       ...   \n995  1515966223509259066  2.268105e+18    appliances.kitchen.washer      beko   \n996  1515966223509127712  2.268105e+18     computers.network.router  mercusys   \n997  1515966223509088532  2.268105e+18       electronics.smartphone   samsung   \n998  1515966223509088671  2.268105e+18       electronics.smartphone     apple   \n999  1515966223509108006  2.268105e+18       electronics.smartphone    xiaomi   \n\n      price       user_id   age sex local  \n0    162.01  1.515916e+18  24.0   女    海南  \n1    162.01  1.515916e+18  24.0   女    海南  \n2     77.52  1.515916e+18  38.0   女    北京  \n3     77.52  1.515916e+18  38.0   女    北京  \n4    217.57  1.515916e+18  32.0   女    广东  \n..      ...           ...   ...  ..   ...  \n995  203.68  1.515916e+18  49.0   男    广东  \n996   16.88  1.515916e+18  24.0   男    广东  \n997  300.90  1.515916e+18  28.0   女    北京  \n998  925.67  1.515916e+18  20.0   男    上海  \n999  110.86  1.515916e+18  37.0   女    湖南  \n\n[1000 rows x 12 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Unnamed: 0</th>\n      <th>event_time</th>\n      <th>order_id</th>\n      <th>product_id</th>\n      <th>category_id</th>\n      <th>category_code</th>\n      <th>brand</th>\n      <th>price</th>\n      <th>user_id</th>\n      <th>age</th>\n      <th>sex</th>\n      <th>local</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>0</td>\n      <td>2020-04-24 11:50:39 UTC</td>\n      <td>2294359932054536986</td>\n      <td>1515966223509089906</td>\n      <td>2.268105e+18</td>\n      <td>electronics.tablet</td>\n      <td>samsung</td>\n      <td>162.01</td>\n      <td>1.515916e+18</td>\n      <td>24.0</td>\n      <td>女</td>\n      <td>海南</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>1</td>\n      <td>2020-04-24 11:50:39 UTC</td>\n      <td>2294359932054536986</td>\n      <td>1515966223509089906</td>\n      <td>2.268105e+18</td>\n      <td>electronics.tablet</td>\n      <td>samsung</td>\n      <td>162.01</td>\n      <td>1.515916e+18</td>\n      <td>24.0</td>\n      <td>女</td>\n      <td>海南</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>2</td>\n      <td>2020-04-24 14:37:43 UTC</td>\n      <td>2294444024058086220</td>\n      <td>2273948319057183658</td>\n      <td>2.268105e+18</td>\n      <td>electronics.audio.headphone</td>\n      <td>huawei</td>\n      <td>77.52</td>\n      <td>1.515916e+18</td>\n      <td>38.0</td>\n      <td>女</td>\n      <td>北京</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>3</td>\n      <td>2020-04-24 14:37:43 UTC</td>\n      <td>2294444024058086220</td>\n      <td>2273948319057183658</td>\n      <td>2.268105e+18</td>\n      <td>electronics.audio.headphone</td>\n      <td>huawei</td>\n      <td>77.52</td>\n      <td>1.515916e+18</td>\n      <td>38.0</td>\n      <td>女</td>\n      <td>北京</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>4</td>\n      <td>2020-04-24 19:16:21 UTC</td>\n      <td>2294584263154074236</td>\n      <td>2273948316817424439</td>\n      <td>2.268105e+18</td>\n      <td>missing</td>\n      <td>karcher</td>\n      <td>217.57</td>\n      <td>1.515916e+18</td>\n      <td>32.0</td>\n      <td>女</td>\n      <td>广东</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>995</th>\n      <td>995</td>\n      <td>2020-05-01 06:13:19 UTC</td>\n      <td>2299263580689662910</td>\n      <td>1515966223509259066</td>\n      <td>2.268105e+18</td>\n      <td>appliances.kitchen.washer</td>\n      <td>beko</td>\n      <td>203.68</td>\n      <td>1.515916e+18</td>\n      <td>49.0</td>\n      <td>男</td>\n      <td>广东</td>\n    </tr>\n    <tr>\n      <th>996</th>\n      <td>996</td>\n      <td>2020-05-01 06:14:11 UTC</td>\n      <td>2299264013382452202</td>\n      <td>1515966223509127712</td>\n      <td>2.268105e+18</td>\n      <td>computers.network.router</td>\n      <td>mercusys</td>\n      <td>16.88</td>\n      <td>1.515916e+18</td>\n      <td>24.0</td>\n      <td>男</td>\n      <td>广东</td>\n    </tr>\n    <tr>\n      <th>997</th>\n      <td>997</td>\n      <td>2020-05-01 06:15:29 UTC</td>\n      <td>2299264670051074093</td>\n      <td>1515966223509088532</td>\n      <td>2.268105e+18</td>\n      <td>electronics.smartphone</td>\n      <td>samsung</td>\n      <td>300.90</td>\n      <td>1.515916e+18</td>\n      <td>28.0</td>\n      <td>女</td>\n      <td>北京</td>\n    </tr>\n    <tr>\n      <th>998</th>\n      <td>998</td>\n      <td>2020-05-01 06:16:16 UTC</td>\n      <td>2299265061060870223</td>\n      <td>1515966223509088671</td>\n      <td>2.268105e+18</td>\n      <td>electronics.smartphone</td>\n      <td>apple</td>\n      <td>925.67</td>\n      <td>1.515916e+18</td>\n      <td>20.0</td>\n      <td>男</td>\n      <td>上海</td>\n    </tr>\n    <tr>\n      <th>999</th>\n      <td>999</td>\n      <td>2020-05-01 06:16:45 UTC</td>\n      <td>2299265304112398434</td>\n      <td>1515966223509108006</td>\n      <td>2.268105e+18</td>\n      <td>electronics.smartphone</td>\n      <td>xiaomi</td>\n      <td>110.86</td>\n      <td>1.515916e+18</td>\n      <td>37.0</td>\n      <td>女</td>\n      <td>湖南</td>\n    </tr>\n  </tbody>\n</table>\n<p>1000 rows × 12 columns</p>\n</div>"
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.drop_duplicates(inplace=True)\n",
    "df"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "outputs": [
    {
     "data": {
      "text/plain": "    local    brand  order_id\n0      上海  akvafor         3\n1      上海    altel         1\n2      上海    apple         6\n3      上海     asus         2\n4      上海   ausini         2\n..    ...      ...       ...\n463    重庆    trust         2\n464    重庆    vitek         2\n465    重庆    wacom         1\n466    重庆     xbox         1\n467    重庆   xiaomi         1\n\n[468 rows x 3 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>local</th>\n      <th>brand</th>\n      <th>order_id</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>上海</td>\n      <td>akvafor</td>\n      <td>3</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>上海</td>\n      <td>altel</td>\n      <td>1</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>上海</td>\n      <td>apple</td>\n      <td>6</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>上海</td>\n      <td>asus</td>\n      <td>2</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>上海</td>\n      <td>ausini</td>\n      <td>2</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>463</th>\n      <td>重庆</td>\n      <td>trust</td>\n      <td>2</td>\n    </tr>\n    <tr>\n      <th>464</th>\n      <td>重庆</td>\n      <td>vitek</td>\n      <td>2</td>\n    </tr>\n    <tr>\n      <th>465</th>\n      <td>重庆</td>\n      <td>wacom</td>\n      <td>1</td>\n    </tr>\n    <tr>\n      <th>466</th>\n      <td>重庆</td>\n      <td>xbox</td>\n      <td>1</td>\n    </tr>\n    <tr>\n      <th>467</th>\n      <td>重庆</td>\n      <td>xiaomi</td>\n      <td>1</td>\n    </tr>\n  </tbody>\n</table>\n<p>468 rows × 3 columns</p>\n</div>"
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "result = df.groupby([\"local\",\"brand\"])[\"order_id\"].count()\n",
    "# 解决多层次索引\n",
    "result.reset_index()"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "outputs": [
    {
     "data": {
      "text/plain": "    local    brand    price\n0      上海  akvafor    33.27\n1      上海    altel    57.85\n2      上海    apple  3704.72\n3      上海     asus   701.34\n4      上海   ausini    17.32\n..    ...      ...      ...\n463    重庆    trust    55.51\n464    重庆    vitek    62.46\n465    重庆    wacom   150.44\n466    重庆     xbox   194.42\n467    重庆   xiaomi    18.50\n\n[468 rows x 3 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>local</th>\n      <th>brand</th>\n      <th>price</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>上海</td>\n      <td>akvafor</td>\n      <td>33.27</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>上海</td>\n      <td>altel</td>\n      <td>57.85</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>上海</td>\n      <td>apple</td>\n      <td>3704.72</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>上海</td>\n      <td>asus</td>\n      <td>701.34</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>上海</td>\n      <td>ausini</td>\n      <td>17.32</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>463</th>\n      <td>重庆</td>\n      <td>trust</td>\n      <td>55.51</td>\n    </tr>\n    <tr>\n      <th>464</th>\n      <td>重庆</td>\n      <td>vitek</td>\n      <td>62.46</td>\n    </tr>\n    <tr>\n      <th>465</th>\n      <td>重庆</td>\n      <td>wacom</td>\n      <td>150.44</td>\n    </tr>\n    <tr>\n      <th>466</th>\n      <td>重庆</td>\n      <td>xbox</td>\n      <td>194.42</td>\n    </tr>\n    <tr>\n      <th>467</th>\n      <td>重庆</td>\n      <td>xiaomi</td>\n      <td>18.50</td>\n    </tr>\n  </tbody>\n</table>\n<p>468 rows × 3 columns</p>\n</div>"
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "result1 = df.groupby([\"local\",\"brand\"])[\"price\"].sum()\n",
    "result1.reset_index()"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "outputs": [
    {
     "data": {
      "text/plain": "     Unnamed: 0               event_time             order_id  \\\n0             0  2020-04-24 11:50:39 UTC  2294359932054536986   \n1             1  2020-04-24 11:50:39 UTC  2294359932054536986   \n2             2  2020-04-24 14:37:43 UTC  2294444024058086220   \n3             3  2020-04-24 14:37:43 UTC  2294444024058086220   \n4             4  2020-04-24 19:16:21 UTC  2294584263154074236   \n..          ...                      ...                  ...   \n995         995  2020-05-01 06:13:19 UTC  2299263580689662910   \n996         996  2020-05-01 06:14:11 UTC  2299264013382452202   \n997         997  2020-05-01 06:15:29 UTC  2299264670051074093   \n998         998  2020-05-01 06:16:16 UTC  2299265061060870223   \n999         999  2020-05-01 06:16:45 UTC  2299265304112398434   \n\n              product_id   category_id                category_code     brand  \\\n0    1515966223509089906  2.268105e+18           electronics.tablet   samsung   \n1    1515966223509089906  2.268105e+18           electronics.tablet   samsung   \n2    2273948319057183658  2.268105e+18  electronics.audio.headphone    huawei   \n3    2273948319057183658  2.268105e+18  electronics.audio.headphone    huawei   \n4    2273948316817424439  2.268105e+18                      missing   karcher   \n..                   ...           ...                          ...       ...   \n995  1515966223509259066  2.268105e+18    appliances.kitchen.washer      beko   \n996  1515966223509127712  2.268105e+18     computers.network.router  mercusys   \n997  1515966223509088532  2.268105e+18       electronics.smartphone   samsung   \n998  1515966223509088671  2.268105e+18       electronics.smartphone     apple   \n999  1515966223509108006  2.268105e+18       electronics.smartphone    xiaomi   \n\n      price       user_id   age sex local age_box  \n0    162.01  1.515916e+18  24.0   女    海南      青年  \n1    162.01  1.515916e+18  24.0   女    海南      青年  \n2     77.52  1.515916e+18  38.0   女    北京      青年  \n3     77.52  1.515916e+18  38.0   女    北京      青年  \n4    217.57  1.515916e+18  32.0   女    广东      青年  \n..      ...           ...   ...  ..   ...     ...  \n995  203.68  1.515916e+18  49.0   男    广东      中年  \n996   16.88  1.515916e+18  24.0   男    广东      青年  \n997  300.90  1.515916e+18  28.0   女    北京      青年  \n998  925.67  1.515916e+18  20.0   男    上海      年轻  \n999  110.86  1.515916e+18  37.0   女    湖南      青年  \n\n[1000 rows x 13 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Unnamed: 0</th>\n      <th>event_time</th>\n      <th>order_id</th>\n      <th>product_id</th>\n      <th>category_id</th>\n      <th>category_code</th>\n      <th>brand</th>\n      <th>price</th>\n      <th>user_id</th>\n      <th>age</th>\n      <th>sex</th>\n      <th>local</th>\n      <th>age_box</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>0</td>\n      <td>2020-04-24 11:50:39 UTC</td>\n      <td>2294359932054536986</td>\n      <td>1515966223509089906</td>\n      <td>2.268105e+18</td>\n      <td>electronics.tablet</td>\n      <td>samsung</td>\n      <td>162.01</td>\n      <td>1.515916e+18</td>\n      <td>24.0</td>\n      <td>女</td>\n      <td>海南</td>\n      <td>青年</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>1</td>\n      <td>2020-04-24 11:50:39 UTC</td>\n      <td>2294359932054536986</td>\n      <td>1515966223509089906</td>\n      <td>2.268105e+18</td>\n      <td>electronics.tablet</td>\n      <td>samsung</td>\n      <td>162.01</td>\n      <td>1.515916e+18</td>\n      <td>24.0</td>\n      <td>女</td>\n      <td>海南</td>\n      <td>青年</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>2</td>\n      <td>2020-04-24 14:37:43 UTC</td>\n      <td>2294444024058086220</td>\n      <td>2273948319057183658</td>\n      <td>2.268105e+18</td>\n      <td>electronics.audio.headphone</td>\n      <td>huawei</td>\n      <td>77.52</td>\n      <td>1.515916e+18</td>\n      <td>38.0</td>\n      <td>女</td>\n      <td>北京</td>\n      <td>青年</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>3</td>\n      <td>2020-04-24 14:37:43 UTC</td>\n      <td>2294444024058086220</td>\n      <td>2273948319057183658</td>\n      <td>2.268105e+18</td>\n      <td>electronics.audio.headphone</td>\n      <td>huawei</td>\n      <td>77.52</td>\n      <td>1.515916e+18</td>\n      <td>38.0</td>\n      <td>女</td>\n      <td>北京</td>\n      <td>青年</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>4</td>\n      <td>2020-04-24 19:16:21 UTC</td>\n      <td>2294584263154074236</td>\n      <td>2273948316817424439</td>\n      <td>2.268105e+18</td>\n      <td>missing</td>\n      <td>karcher</td>\n      <td>217.57</td>\n      <td>1.515916e+18</td>\n      <td>32.0</td>\n      <td>女</td>\n      <td>广东</td>\n      <td>青年</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>995</th>\n      <td>995</td>\n      <td>2020-05-01 06:13:19 UTC</td>\n      <td>2299263580689662910</td>\n      <td>1515966223509259066</td>\n      <td>2.268105e+18</td>\n      <td>appliances.kitchen.washer</td>\n      <td>beko</td>\n      <td>203.68</td>\n      <td>1.515916e+18</td>\n      <td>49.0</td>\n      <td>男</td>\n      <td>广东</td>\n      <td>中年</td>\n    </tr>\n    <tr>\n      <th>996</th>\n      <td>996</td>\n      <td>2020-05-01 06:14:11 UTC</td>\n      <td>2299264013382452202</td>\n      <td>1515966223509127712</td>\n      <td>2.268105e+18</td>\n      <td>computers.network.router</td>\n      <td>mercusys</td>\n      <td>16.88</td>\n      <td>1.515916e+18</td>\n      <td>24.0</td>\n      <td>男</td>\n      <td>广东</td>\n      <td>青年</td>\n    </tr>\n    <tr>\n      <th>997</th>\n      <td>997</td>\n      <td>2020-05-01 06:15:29 UTC</td>\n      <td>2299264670051074093</td>\n      <td>1515966223509088532</td>\n      <td>2.268105e+18</td>\n      <td>electronics.smartphone</td>\n      <td>samsung</td>\n      <td>300.90</td>\n      <td>1.515916e+18</td>\n      <td>28.0</td>\n      <td>女</td>\n      <td>北京</td>\n      <td>青年</td>\n    </tr>\n    <tr>\n      <th>998</th>\n      <td>998</td>\n      <td>2020-05-01 06:16:16 UTC</td>\n      <td>2299265061060870223</td>\n      <td>1515966223509088671</td>\n      <td>2.268105e+18</td>\n      <td>electronics.smartphone</td>\n      <td>apple</td>\n      <td>925.67</td>\n      <td>1.515916e+18</td>\n      <td>20.0</td>\n      <td>男</td>\n      <td>上海</td>\n      <td>年轻</td>\n    </tr>\n    <tr>\n      <th>999</th>\n      <td>999</td>\n      <td>2020-05-01 06:16:45 UTC</td>\n      <td>2299265304112398434</td>\n      <td>1515966223509108006</td>\n      <td>2.268105e+18</td>\n      <td>electronics.smartphone</td>\n      <td>xiaomi</td>\n      <td>110.86</td>\n      <td>1.515916e+18</td>\n      <td>37.0</td>\n      <td>女</td>\n      <td>湖南</td>\n      <td>青年</td>\n    </tr>\n  </tbody>\n</table>\n<p>1000 rows × 13 columns</p>\n</div>"
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np\n",
    "bins = [0,20,40,60,80,np.inf]\n",
    "labels = [\"年轻\",\"青年\",\"中年\",\"老年\",\"高龄\"]\n",
    "df[\"age_box\"] = pd.cut(df[\"age\"],bins,labels=labels)\n",
    "df"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "outputs": [
    {
     "data": {
      "text/plain": "sex  age_box\n女    年轻          57\n     青年         324\n     中年         130\n     老年           0\n     高龄           0\n男    年轻          65\n     青年         317\n     中年         107\n     老年           0\n     高龄           0\nName: order_id, dtype: int64"
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "result2 = df.groupby([\"sex\",\"age_box\"])[\"order_id\"].count()\n",
    "#诡异\n",
    "result2.reset_index()"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "Int64Index: 1000 entries, 0 to 999\n",
      "Data columns (total 13 columns):\n",
      " #   Column         Non-Null Count  Dtype              \n",
      "---  ------         --------------  -----              \n",
      " 0   Unnamed: 0     1000 non-null   int64              \n",
      " 1   event_time     1000 non-null   datetime64[ns, UTC]\n",
      " 2   order_id       1000 non-null   int64              \n",
      " 3   product_id     1000 non-null   int64              \n",
      " 4   category_id    1000 non-null   float64            \n",
      " 5   category_code  1000 non-null   object             \n",
      " 6   brand          1000 non-null   object             \n",
      " 7   price          1000 non-null   float64            \n",
      " 8   user_id        1000 non-null   float64            \n",
      " 9   age            1000 non-null   float64            \n",
      " 10  sex            1000 non-null   object             \n",
      " 11  local          1000 non-null   object             \n",
      " 12  age_box        1000 non-null   category           \n",
      "dtypes: category(1), datetime64[ns, UTC](1), float64(4), int64(3), object(4)\n",
      "memory usage: 102.7+ KB\n"
     ]
    }
   ],
   "source": [
    "df[\"event_time\"] = pd.to_datetime(df[\"event_time\"])\n",
    "df.info()"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "outputs": [],
   "source": [
    "df[\"month\"] = df[\"event_time\"].dt.month\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "outputs": [
    {
     "data": {
      "text/plain": "           price\nmonth           \n4      111955.30\n5        8069.65",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>price</th>\n    </tr>\n    <tr>\n      <th>month</th>\n      <th></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>4</th>\n      <td>111955.30</td>\n    </tr>\n    <tr>\n      <th>5</th>\n      <td>8069.65</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "execution_count": 52,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": "<Figure size 640x480 with 1 Axes>",
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAjcAAAGbCAYAAAA4HrGmAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAA9hAAAPYQGoP6dpAABJpElEQVR4nO3deVyU9f7+8dfMsMsmoiiKO+aSW4qiQmbZqVBR00q01DyU5YJ10nPqdLRzyqNlHUvct9RcT9rikuXJtALFNcUF0TRUxA0XdmWb+f1xvvH78s1KFLhhuJ6Px/3H3J+5x+u+H+JczHtmNNlsNhsiIiIidsJsdAARERGR0qRyIyIiInZF5UZERETsisqNiIiI2BWVGxEREbErKjciIiJiV1RuRERExK6o3IiIiIhdcTA6QHmzWq2cP38eDw8PTCaT0XFERETkNthsNjIzM/H398ds/u3XZqpcuTl//jwBAQFGxxAREZE7kJycTL169X7zPlWu3Hh4eAD/vTienp4GpxEREZHbkZGRQUBAQNHz+G+pcuXm51GUp6enyo2IiEglcztvKdEbikVERMSuqNyIiIiIXVG5EREREbuiciMiIiJ2ReVGRERE7IrKjYiIiNgVlRsRERGxKyo3IiIiYldUbkRERMSuqNyIiIiIXVG5EREREbuiciMiIiJ2ReWmlKTfyGfwwl3EJ6cZHUVERKRKU7kpJf/6z3F2nrr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u6779pSU1Nt169ftxUUFPzimIMHD9qqVatmO3TokC0zM9PWrl0723vvvWdA+spt2LBhtiVLlthsNpsNsB04cOAX93nppZdsQLGtQYMG5Zqzsrud6/x/NWjQwJaUlFSmuezN7V7nRYsW2QIDA20uLi624OBgW2JiYvmFtAO3c52vX79ue+aZZ2w1a9a0ubi42Pr27WtLTU0t36CVzPLly22NGjWybd261bZlyxZbs2bNbMOHD7fZbDZbenq6LS8v7xfHpKam2lxcXGxff/21LS8vz/boo4/axowZU+ZZ9b+C34Hhw4fzwAMPMHz4cEwmEwcOHLjlb6+vv/467733Hi4uLgQGBhITE4Orq2v5BxYRESkFr732GnPnzsVisfD0008zZcoUqlWrRsOGDfnggw/o16/fL46ZN28eUVFRuLu74+3tTVxcHH5+fmWaU+WmjCUkJJCSkkL37t31nhsREamSkpKSSExMJDQ0tFy+I0vlRkREROyKPgouIiIidkXlRkREROyKyo2IiIjYFZUbERERsSsqNyIiImJXVG5ERETErqjciIiIiF1RuRERERG7onIjIiIiduX/AUJ9OT+GfMk7AAAAAElFTkSuQmCC"
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "def paint(res):\n",
    "\tplt.plot(res.index,res.values)\n",
    "\n",
    "result3 = df.groupby(\"month\")[[\"price\"]].sum()\n",
    "paint(result3)\n",
    "result3\n",
    "# 4月销售额最高"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "outputs": [
    {
     "data": {
      "text/plain": "       user_id\nmonth         \n4          621\n5           73",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>user_id</th>\n    </tr>\n    <tr>\n      <th>month</th>\n      <th></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>4</th>\n      <td>621</td>\n    </tr>\n    <tr>\n      <th>5</th>\n      <td>73</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "execution_count": 53,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "result4 = df.groupby(\"month\")[[\"user_id\"]].nunique()\n",
    "result4"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "outputs": [
    {
     "data": {
      "text/plain": "           price  user_id\nmonth                    \n4      111955.30      621\n5        8069.65       73",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>price</th>\n      <th>user_id</th>\n    </tr>\n    <tr>\n      <th>month</th>\n      <th></th>\n      <th></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>4</th>\n      <td>111955.30</td>\n      <td>621</td>\n    </tr>\n    <tr>\n      <th>5</th>\n      <td>8069.65</td>\n      <td>73</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "execution_count": 55,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "result5 = result3.merge(result4,left_index=True,right_index=True)\n",
    "result5"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "outputs": [
    {
     "data": {
      "text/plain": "[<matplotlib.lines.Line2D at 0x11501b2fb20>]"
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": "<Figure size 640x480 with 1 Axes>",
      "image/png": "i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yMsLIxOnTpRt25dxowZwz333EOTJk2Ke/xSozD7HBISwjvvvIPJZOLy5cu8++679OzZs7hHL1VGjRpF8+bNc3+YiYuLw2g04ufnd8tjgoKCWLJkSe75YnsutMgdHT161JKSkpJ76tevn+W9996zpKWlWc6ePWu5evXqDcfs2rXLUq5cOcvu3bstGRkZlmbNmlkmTZpkg+lLt0GDBlnmz59vsVgsFsASHx9/w3UiIyMtQJ6Tv79/sc5Z2uVnn/+Xv7+/JSUlpUjnsjf53ee5c+daAgMDLS4uLpbg4GBLUlJS8Q1pB/Kzz2fPnrU89dRTlkqVKllcXFwsvXr1sqSlpRXvoKXMwoULLQEBAZYffvjBEh0dbalXr55l8ODBFovFYklPT7dcvnz5hmPS0tIsLi4ulu+//95y+fJlS5cuXSzDhg0r8ln1r4IXwuDBg7n//vsZPHgwBoOB+Pj4m/70+vrrrzNp0iRcXFwIDAwkNjYWV1fX4h9YRETECkaPHs3MmTMxmUw8+eSTjB8/nnLlylGrVi2ioqLo3bv3DcfMmjWLiIgI3N3d8fLyIi4ujipVqhTpnAo3RSwxMZHU1FQ6dOig99yIiEiZlJKSQlJSEiEhIcXSkaVwIyIiInZFHwUXERERu6JwIyIiInZF4UZERETsisKNiIiI2BWFGxEREbErCjciIiJiVxRuRERExK4o3IiIiIhdUbgRERERu/L/Ad3dzKdKayyOAAAAAElFTkSuQmCC"
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(result5.index,result5[\"price\"])\n",
    "plt.plot(result5.index,result5[\"user_id\"])\n",
    "\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "outputs": [
    {
     "data": {
      "text/plain": "2"
     },
     "execution_count": 58,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sqlalchemy import create_engine\n",
    "conn = create_engine('mysql+pymysql://root:123456@localhost/db_16')\n",
    "result5 = result5.reset_index()\n",
    "result5.to_sql(\"ds\",conn)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "outputs": [
    {
     "data": {
      "text/plain": "   local  user_id  order_id     price\n0     上海      102       132  15459.66\n1     北京      132       193  29080.60\n2     四川       34        55   5884.03\n3     天津       27        39   6032.45\n4     广东      158       209  23180.02\n5     江苏       37        50   4803.33\n6     浙江       42        54   5605.25\n7     海南       37        90   8862.78\n8     湖北       48        69  11229.93\n9     湖南       33        45   3494.09\n10    重庆       43        64   6392.81",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>local</th>\n      <th>user_id</th>\n      <th>order_id</th>\n      <th>price</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>上海</td>\n      <td>102</td>\n      <td>132</td>\n      <td>15459.66</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>北京</td>\n      <td>132</td>\n      <td>193</td>\n      <td>29080.60</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>四川</td>\n      <td>34</td>\n      <td>55</td>\n      <td>5884.03</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>天津</td>\n      <td>27</td>\n      <td>39</td>\n      <td>6032.45</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>广东</td>\n      <td>158</td>\n      <td>209</td>\n      <td>23180.02</td>\n    </tr>\n    <tr>\n      <th>5</th>\n      <td>江苏</td>\n      <td>37</td>\n      <td>50</td>\n      <td>4803.33</td>\n    </tr>\n    <tr>\n      <th>6</th>\n      <td>浙江</td>\n      <td>42</td>\n      <td>54</td>\n      <td>5605.25</td>\n    </tr>\n    <tr>\n      <th>7</th>\n      <td>海南</td>\n      <td>37</td>\n      <td>90</td>\n      <td>8862.78</td>\n    </tr>\n    <tr>\n      <th>8</th>\n      <td>湖北</td>\n      <td>48</td>\n      <td>69</td>\n      <td>11229.93</td>\n    </tr>\n    <tr>\n      <th>9</th>\n      <td>湖南</td>\n      <td>33</td>\n      <td>45</td>\n      <td>3494.09</td>\n    </tr>\n    <tr>\n      <th>10</th>\n      <td>重庆</td>\n      <td>43</td>\n      <td>64</td>\n      <td>6392.81</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "execution_count": 63,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# uc = df.groupby(\"local\")[[\"user_id\"]].nunique()\n",
    "# oc = df.groupby(\"local\")[[\"user_id\"]].nunique()\n",
    "result6 = df.groupby(\"local\").agg({\"user_id\":\"nunique\",\"order_id\":\"count\",\"price\":\"sum\"}).reset_index()\n",
    "result6"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "outputs": [
    {
     "data": {
      "text/plain": "        Unnamed: 0                event_time             order_id  \\\n0                0 2020-04-24 11:50:39+00:00  2294359932054536986   \n1                1 2020-04-24 11:50:39+00:00  2294359932054536986   \n2                2 2020-04-24 14:37:43+00:00  2294444024058086220   \n3                3 2020-04-24 14:37:43+00:00  2294444024058086220   \n4                4 2020-04-24 19:16:21+00:00  2294584263154074236   \n...            ...                       ...                  ...   \n564164     2633516 2020-11-21 10:10:01+00:00  2388440981134693942   \n564165     2633517 2020-11-21 10:10:13+00:00  2388440981134693943   \n564166     2633518 2020-11-21 10:10:30+00:00  2388440981134693944   \n564167     2633519 2020-11-21 10:10:30+00:00  2388440981134693944   \n564168     2633520 2020-11-21 10:10:30+00:00  2388440981134693944   \n\n                 product_id   category_id                category_code  \\\n0       1515966223509089906  2.268105e+18           electronics.tablet   \n1       1515966223509089906  2.268105e+18           electronics.tablet   \n2       2273948319057183658  2.268105e+18  electronics.audio.headphone   \n3       2273948319057183658  2.268105e+18  electronics.audio.headphone   \n4       2273948316817424439  2.268105e+18                          NaN   \n...                     ...           ...                          ...   \n564164  1515966223526602848  2.268105e+18       electronics.smartphone   \n564165  1515966223509089282  2.268105e+18       electronics.smartphone   \n564166  1515966223509089917  2.268105e+18   appliances.personal.scales   \n564167  2273948184839454837  2.268105e+18                          NaN   \n564168  1515966223509127566  2.268105e+18   appliances.kitchen.blender   \n\n           brand   price       user_id   age sex local  \n0        samsung  162.01  1.515916e+18  24.0   女    海南  \n1        samsung  162.01  1.515916e+18  24.0   女    海南  \n2         huawei   77.52  1.515916e+18  38.0   女    北京  \n3         huawei   77.52  1.515916e+18  38.0   女    北京  \n4        karcher  217.57  1.515916e+18  32.0   女    广东  \n...          ...     ...           ...   ...  ..   ...  \n564164      oppo  138.87  1.515916e+18  21.0   男    上海  \n564165     apple  418.96  1.515916e+18  21.0   女    北京  \n564166     vitek   12.48  1.515916e+18  19.0   女    上海  \n564167  moulinex   41.64  1.515916e+18  19.0   女    上海  \n564168   redmond   53.22  1.515916e+18  19.0   女    上海  \n\n[564169 rows x 12 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Unnamed: 0</th>\n      <th>event_time</th>\n      <th>order_id</th>\n      <th>product_id</th>\n      <th>category_id</th>\n      <th>category_code</th>\n      <th>brand</th>\n      <th>price</th>\n      <th>user_id</th>\n      <th>age</th>\n      <th>sex</th>\n      <th>local</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>0</td>\n      <td>2020-04-24 11:50:39+00:00</td>\n      <td>2294359932054536986</td>\n      <td>1515966223509089906</td>\n      <td>2.268105e+18</td>\n      <td>electronics.tablet</td>\n      <td>samsung</td>\n      <td>162.01</td>\n      <td>1.515916e+18</td>\n      <td>24.0</td>\n      <td>女</td>\n      <td>海南</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>1</td>\n      <td>2020-04-24 11:50:39+00:00</td>\n      <td>2294359932054536986</td>\n      <td>1515966223509089906</td>\n      <td>2.268105e+18</td>\n      <td>electronics.tablet</td>\n      <td>samsung</td>\n      <td>162.01</td>\n      <td>1.515916e+18</td>\n      <td>24.0</td>\n      <td>女</td>\n      <td>海南</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>2</td>\n      <td>2020-04-24 14:37:43+00:00</td>\n      <td>2294444024058086220</td>\n      <td>2273948319057183658</td>\n      <td>2.268105e+18</td>\n      <td>electronics.audio.headphone</td>\n      <td>huawei</td>\n      <td>77.52</td>\n      <td>1.515916e+18</td>\n      <td>38.0</td>\n      <td>女</td>\n      <td>北京</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>3</td>\n      <td>2020-04-24 14:37:43+00:00</td>\n      <td>2294444024058086220</td>\n      <td>2273948319057183658</td>\n      <td>2.268105e+18</td>\n      <td>electronics.audio.headphone</td>\n      <td>huawei</td>\n      <td>77.52</td>\n      <td>1.515916e+18</td>\n      <td>38.0</td>\n      <td>女</td>\n      <td>北京</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>4</td>\n      <td>2020-04-24 19:16:21+00:00</td>\n      <td>2294584263154074236</td>\n      <td>2273948316817424439</td>\n      <td>2.268105e+18</td>\n      <td>NaN</td>\n      <td>karcher</td>\n      <td>217.57</td>\n      <td>1.515916e+18</td>\n      <td>32.0</td>\n      <td>女</td>\n      <td>广东</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>564164</th>\n      <td>2633516</td>\n      <td>2020-11-21 10:10:01+00:00</td>\n      <td>2388440981134693942</td>\n      <td>1515966223526602848</td>\n      <td>2.268105e+18</td>\n      <td>electronics.smartphone</td>\n      <td>oppo</td>\n      <td>138.87</td>\n      <td>1.515916e+18</td>\n      <td>21.0</td>\n      <td>男</td>\n      <td>上海</td>\n    </tr>\n    <tr>\n      <th>564165</th>\n      <td>2633517</td>\n      <td>2020-11-21 10:10:13+00:00</td>\n      <td>2388440981134693943</td>\n      <td>1515966223509089282</td>\n      <td>2.268105e+18</td>\n      <td>electronics.smartphone</td>\n      <td>apple</td>\n      <td>418.96</td>\n      <td>1.515916e+18</td>\n      <td>21.0</td>\n      <td>女</td>\n      <td>北京</td>\n    </tr>\n    <tr>\n      <th>564166</th>\n      <td>2633518</td>\n      <td>2020-11-21 10:10:30+00:00</td>\n      <td>2388440981134693944</td>\n      <td>1515966223509089917</td>\n      <td>2.268105e+18</td>\n      <td>appliances.personal.scales</td>\n      <td>vitek</td>\n      <td>12.48</td>\n      <td>1.515916e+18</td>\n      <td>19.0</td>\n      <td>女</td>\n      <td>上海</td>\n    </tr>\n    <tr>\n      <th>564167</th>\n      <td>2633519</td>\n      <td>2020-11-21 10:10:30+00:00</td>\n      <td>2388440981134693944</td>\n      <td>2273948184839454837</td>\n      <td>2.268105e+18</td>\n      <td>NaN</td>\n      <td>moulinex</td>\n      <td>41.64</td>\n      <td>1.515916e+18</td>\n      <td>19.0</td>\n      <td>女</td>\n      <td>上海</td>\n    </tr>\n    <tr>\n      <th>564168</th>\n      <td>2633520</td>\n      <td>2020-11-21 10:10:30+00:00</td>\n      <td>2388440981134693944</td>\n      <td>1515966223509127566</td>\n      <td>2.268105e+18</td>\n      <td>appliances.kitchen.blender</td>\n      <td>redmond</td>\n      <td>53.22</td>\n      <td>1.515916e+18</td>\n      <td>19.0</td>\n      <td>女</td>\n      <td>上海</td>\n    </tr>\n  </tbody>\n</table>\n<p>564169 rows × 12 columns</p>\n</div>"
     },
     "execution_count": 82,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#5\n",
    "df1 = pd.read_csv(\"C:\\\\Users\\\\Administrator\\\\Desktop\\\\Python数据分析\\\\月考题\\\\大数据 大数据系 专高5 《Python数据分析EDA》月考题库（修改2）\\\\3-2 大数据 大数据系 专高5 《Python数据分析EDA》月考题库（新建）-已入库\\\\3-2 大数据 大数据系 专高5 《Python数据分析EDA》月考题库（新建）-已入库\\\\02-02-5-00007\\\\附件\\\\数据源\\\\电子产品销售分析.csv\")\n",
    "df1[\"event_time\"] = pd.to_datetime(df1[\"event_time\"])\n",
    "df1"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "outputs": [
    {
     "data": {
      "text/plain": "month          1    2    3    4           5       6        7    8       9   \\\nuser_id                                                                      \n1.515916e+18  0.0  0.0  0.0  0.0    0.000000    0.00  416.640  0.0    0.00   \n1.515916e+18  0.0  0.0  0.0  0.0    0.000000    0.00    0.000  0.0   21.04   \n1.515916e+18  0.0  0.0  0.0  0.0    0.000000    0.00    0.000  0.0    0.00   \n1.515916e+18  0.0  0.0  0.0  0.0  214.483333  324.05  630.185  0.0  414.33   \n1.515916e+18  0.0  0.0  0.0  0.0   43.960000    0.00  138.870  0.0    0.00   \n...           ...  ...  ...  ...         ...     ...      ...  ...     ...   \n1.515916e+18  0.0  0.0  0.0  0.0    0.000000    0.00    0.000  0.0    0.00   \n1.515916e+18  0.0  0.0  0.0  0.0    0.000000    0.00    0.000  0.0    0.00   \n1.515916e+18  0.0  0.0  0.0  0.0    0.000000    0.00    0.000  0.0    0.00   \n1.515916e+18  0.0  0.0  0.0  0.0    0.000000    0.00    0.000  0.0    0.00   \n1.515916e+18  0.0  0.0  0.0  0.0    0.000000    0.00    0.000  0.0    0.00   \n\nmonth                 10        11  \nuser_id                             \n1.515916e+18    0.000000     0.000  \n1.515916e+18   35.390000     0.000  \n1.515916e+18  253.242500   651.737  \n1.515916e+18   60.142727    56.690  \n1.515916e+18    0.000000     0.000  \n...                  ...       ...  \n1.515916e+18    0.000000   208.310  \n1.515916e+18    0.000000  3472.200  \n1.515916e+18    0.000000   250.830  \n1.515916e+18    0.000000   925.670  \n1.515916e+18    0.000000   418.960  \n\n[93818 rows x 11 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th>month</th>\n      <th>1</th>\n      <th>2</th>\n      <th>3</th>\n      <th>4</th>\n      <th>5</th>\n      <th>6</th>\n      <th>7</th>\n      <th>8</th>\n      <th>9</th>\n      <th>10</th>\n      <th>11</th>\n    </tr>\n    <tr>\n      <th>user_id</th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>1.515916e+18</th>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0.000000</td>\n      <td>0.00</td>\n      <td>416.640</td>\n      <td>0.0</td>\n      <td>0.00</td>\n      <td>0.000000</td>\n      <td>0.000</td>\n    </tr>\n    <tr>\n      <th>1.515916e+18</th>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0.000000</td>\n      <td>0.00</td>\n      <td>0.000</td>\n      <td>0.0</td>\n      <td>21.04</td>\n      <td>35.390000</td>\n      <td>0.000</td>\n    </tr>\n    <tr>\n      <th>1.515916e+18</th>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0.000000</td>\n      <td>0.00</td>\n      <td>0.000</td>\n      <td>0.0</td>\n      <td>0.00</td>\n      <td>253.242500</td>\n      <td>651.737</td>\n    </tr>\n    <tr>\n      <th>1.515916e+18</th>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>214.483333</td>\n      <td>324.05</td>\n      <td>630.185</td>\n      <td>0.0</td>\n      <td>414.33</td>\n      <td>60.142727</td>\n      <td>56.690</td>\n    </tr>\n    <tr>\n      <th>1.515916e+18</th>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>43.960000</td>\n      <td>0.00</td>\n      <td>138.870</td>\n      <td>0.0</td>\n      <td>0.00</td>\n      <td>0.000000</td>\n      <td>0.000</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>1.515916e+18</th>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0.000000</td>\n      <td>0.00</td>\n      <td>0.000</td>\n      <td>0.0</td>\n      <td>0.00</td>\n      <td>0.000000</td>\n      <td>208.310</td>\n    </tr>\n    <tr>\n      <th>1.515916e+18</th>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0.000000</td>\n      <td>0.00</td>\n      <td>0.000</td>\n      <td>0.0</td>\n      <td>0.00</td>\n      <td>0.000000</td>\n      <td>3472.200</td>\n    </tr>\n    <tr>\n      <th>1.515916e+18</th>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0.000000</td>\n      <td>0.00</td>\n      <td>0.000</td>\n      <td>0.0</td>\n      <td>0.00</td>\n      <td>0.000000</td>\n      <td>250.830</td>\n    </tr>\n    <tr>\n      <th>1.515916e+18</th>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0.000000</td>\n      <td>0.00</td>\n      <td>0.000</td>\n      <td>0.0</td>\n      <td>0.00</td>\n      <td>0.000000</td>\n      <td>925.670</td>\n    </tr>\n    <tr>\n      <th>1.515916e+18</th>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0.000000</td>\n      <td>0.00</td>\n      <td>0.000</td>\n      <td>0.0</td>\n      <td>0.00</td>\n      <td>0.000000</td>\n      <td>418.960</td>\n    </tr>\n  </tbody>\n</table>\n<p>93818 rows × 11 columns</p>\n</div>"
     },
     "execution_count": 81,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df1[\"month\"] = df1[\"event_time\"].dt.month\n",
    "pivoted_amount =df1[df1['price']>0].pivot_table(index='user_id',\n",
    "columns='month',\n",
    "values='price',\n",
    "aggfunc='mean').fillna(0)\n",
    "pivoted_amount"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 67,
   "outputs": [
    {
     "data": {
      "text/plain": "month         4  5\nuser_id           \n1.515916e+18  1  0\n1.515916e+18  1  0\n1.515916e+18  1  0\n1.515916e+18  1  0\n1.515916e+18  1  0\n...          .. ..\n1.515916e+18  1  0\n1.515916e+18  1  0\n1.515916e+18  1  0\n1.515916e+18  1  0\n1.515916e+18  1  0\n\n[690 rows x 2 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th>month</th>\n      <th>4</th>\n      <th>5</th>\n    </tr>\n    <tr>\n      <th>user_id</th>\n      <th></th>\n      <th></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>1.515916e+18</th>\n      <td>1</td>\n      <td>0</td>\n    </tr>\n    <tr>\n      <th>1.515916e+18</th>\n      <td>1</td>\n      <td>0</td>\n    </tr>\n    <tr>\n      <th>1.515916e+18</th>\n      <td>1</td>\n      <td>0</td>\n    </tr>\n    <tr>\n      <th>1.515916e+18</th>\n      <td>1</td>\n      <td>0</td>\n    </tr>\n    <tr>\n      <th>1.515916e+18</th>\n      <td>1</td>\n      <td>0</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>1.515916e+18</th>\n      <td>1</td>\n      <td>0</td>\n    </tr>\n    <tr>\n      <th>1.515916e+18</th>\n      <td>1</td>\n      <td>0</td>\n    </tr>\n    <tr>\n      <th>1.515916e+18</th>\n      <td>1</td>\n      <td>0</td>\n    </tr>\n    <tr>\n      <th>1.515916e+18</th>\n      <td>1</td>\n      <td>0</td>\n    </tr>\n    <tr>\n      <th>1.515916e+18</th>\n      <td>1</td>\n      <td>0</td>\n    </tr>\n  </tbody>\n</table>\n<p>690 rows × 2 columns</p>\n</div>"
     },
     "execution_count": 67,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pivoted_purchase = pivoted_amount.applymap(lambda x:1 if x>0 else 0)\n",
    "pivoted_purchase\n",
    "\n",
    "columns_month = df['month'].sort_values().astype('str').unique()\n",
    "pivoted_amount.columns = columns_month\n",
    "pivoted_amount.columns\n",
    "\n",
    "pivoted_purchase"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "outputs": [
    {
     "ename": "KeyError",
     "evalue": "0",
     "output_type": "error",
     "traceback": [
      "\u001B[1;31m---------------------------------------------------------------------------\u001B[0m",
      "\u001B[1;31mKeyError\u001B[0m                                  Traceback (most recent call last)",
      "File \u001B[1;32mF:\\python38\\lib\\site-packages\\pandas\\core\\indexes\\base.py:3621\u001B[0m, in \u001B[0;36mIndex.get_loc\u001B[1;34m(self, key, method, tolerance)\u001B[0m\n\u001B[0;32m   3620\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[1;32m-> 3621\u001B[0m     \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43m_engine\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mget_loc\u001B[49m\u001B[43m(\u001B[49m\u001B[43mcasted_key\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m   3622\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m \u001B[38;5;167;01mKeyError\u001B[39;00m \u001B[38;5;28;01mas\u001B[39;00m err:\n",
      "File \u001B[1;32mF:\\python38\\lib\\site-packages\\pandas\\_libs\\index.pyx:136\u001B[0m, in \u001B[0;36mpandas._libs.index.IndexEngine.get_loc\u001B[1;34m()\u001B[0m\n",
      "File \u001B[1;32mF:\\python38\\lib\\site-packages\\pandas\\_libs\\index.pyx:163\u001B[0m, in \u001B[0;36mpandas._libs.index.IndexEngine.get_loc\u001B[1;34m()\u001B[0m\n",
      "File \u001B[1;32mpandas\\_libs\\hashtable_class_helper.pxi:2131\u001B[0m, in \u001B[0;36mpandas._libs.hashtable.Int64HashTable.get_item\u001B[1;34m()\u001B[0m\n",
      "File \u001B[1;32mpandas\\_libs\\hashtable_class_helper.pxi:2140\u001B[0m, in \u001B[0;36mpandas._libs.hashtable.Int64HashTable.get_item\u001B[1;34m()\u001B[0m\n",
      "\u001B[1;31mKeyError\u001B[0m: 0",
      "\nThe above exception was the direct cause of the following exception:\n",
      "\u001B[1;31mKeyError\u001B[0m                                  Traceback (most recent call last)",
      "Cell \u001B[1;32mIn[68], line 34\u001B[0m\n\u001B[0;32m     32\u001B[0m \t\u001B[38;5;28;01mreturn\u001B[39;00m pd\u001B[38;5;241m.\u001B[39mSeries(status,index\u001B[38;5;241m=\u001B[39mcolumns_month)\n\u001B[0;32m     33\u001B[0m \u001B[38;5;66;03m# apply 传递的行\u001B[39;00m\n\u001B[1;32m---> 34\u001B[0m pivoted_purchase_status \u001B[38;5;241m=\u001B[39m \u001B[43mpivoted_purchase\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mapply\u001B[49m\u001B[43m(\u001B[49m\u001B[38;5;28;43;01mlambda\u001B[39;49;00m\u001B[43m \u001B[49m\u001B[43mx\u001B[49m\u001B[43m:\u001B[49m\u001B[43mactive_status\u001B[49m\u001B[43m(\u001B[49m\u001B[43mx\u001B[49m\u001B[43m)\u001B[49m\u001B[43m,\u001B[49m\u001B[43maxis\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;241;43m1\u001B[39;49m\u001B[43m)\u001B[49m\n\u001B[0;32m     35\u001B[0m pivoted_purchase_status\n",
      "File \u001B[1;32mF:\\python38\\lib\\site-packages\\pandas\\core\\frame.py:8839\u001B[0m, in \u001B[0;36mDataFrame.apply\u001B[1;34m(self, func, axis, raw, result_type, args, **kwargs)\u001B[0m\n\u001B[0;32m   8828\u001B[0m \u001B[38;5;28;01mfrom\u001B[39;00m \u001B[38;5;21;01mpandas\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mcore\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mapply\u001B[39;00m \u001B[38;5;28;01mimport\u001B[39;00m frame_apply\n\u001B[0;32m   8830\u001B[0m op \u001B[38;5;241m=\u001B[39m frame_apply(\n\u001B[0;32m   8831\u001B[0m     \u001B[38;5;28mself\u001B[39m,\n\u001B[0;32m   8832\u001B[0m     func\u001B[38;5;241m=\u001B[39mfunc,\n\u001B[1;32m   (...)\u001B[0m\n\u001B[0;32m   8837\u001B[0m     kwargs\u001B[38;5;241m=\u001B[39mkwargs,\n\u001B[0;32m   8838\u001B[0m )\n\u001B[1;32m-> 8839\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[43mop\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mapply\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\u001B[38;5;241m.\u001B[39m__finalize__(\u001B[38;5;28mself\u001B[39m, method\u001B[38;5;241m=\u001B[39m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mapply\u001B[39m\u001B[38;5;124m\"\u001B[39m)\n",
      "File \u001B[1;32mF:\\python38\\lib\\site-packages\\pandas\\core\\apply.py:727\u001B[0m, in \u001B[0;36mFrameApply.apply\u001B[1;34m(self)\u001B[0m\n\u001B[0;32m    724\u001B[0m \u001B[38;5;28;01melif\u001B[39;00m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mraw:\n\u001B[0;32m    725\u001B[0m     \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mapply_raw()\n\u001B[1;32m--> 727\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mapply_standard\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\n",
      "File \u001B[1;32mF:\\python38\\lib\\site-packages\\pandas\\core\\apply.py:851\u001B[0m, in \u001B[0;36mFrameApply.apply_standard\u001B[1;34m(self)\u001B[0m\n\u001B[0;32m    850\u001B[0m \u001B[38;5;28;01mdef\u001B[39;00m \u001B[38;5;21mapply_standard\u001B[39m(\u001B[38;5;28mself\u001B[39m):\n\u001B[1;32m--> 851\u001B[0m     results, res_index \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mapply_series_generator\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m    853\u001B[0m     \u001B[38;5;66;03m# wrap results\u001B[39;00m\n\u001B[0;32m    854\u001B[0m     \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mwrap_results(results, res_index)\n",
      "File \u001B[1;32mF:\\python38\\lib\\site-packages\\pandas\\core\\apply.py:867\u001B[0m, in \u001B[0;36mFrameApply.apply_series_generator\u001B[1;34m(self)\u001B[0m\n\u001B[0;32m    864\u001B[0m \u001B[38;5;28;01mwith\u001B[39;00m option_context(\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mmode.chained_assignment\u001B[39m\u001B[38;5;124m\"\u001B[39m, \u001B[38;5;28;01mNone\u001B[39;00m):\n\u001B[0;32m    865\u001B[0m     \u001B[38;5;28;01mfor\u001B[39;00m i, v \u001B[38;5;129;01min\u001B[39;00m \u001B[38;5;28menumerate\u001B[39m(series_gen):\n\u001B[0;32m    866\u001B[0m         \u001B[38;5;66;03m# ignore SettingWithCopy here in case the user mutates\u001B[39;00m\n\u001B[1;32m--> 867\u001B[0m         results[i] \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mf\u001B[49m\u001B[43m(\u001B[49m\u001B[43mv\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m    868\u001B[0m         \u001B[38;5;28;01mif\u001B[39;00m \u001B[38;5;28misinstance\u001B[39m(results[i], ABCSeries):\n\u001B[0;32m    869\u001B[0m             \u001B[38;5;66;03m# If we have a view on v, we need to make a copy because\u001B[39;00m\n\u001B[0;32m    870\u001B[0m             \u001B[38;5;66;03m#  series_generator will swap out the underlying data\u001B[39;00m\n\u001B[0;32m    871\u001B[0m             results[i] \u001B[38;5;241m=\u001B[39m results[i]\u001B[38;5;241m.\u001B[39mcopy(deep\u001B[38;5;241m=\u001B[39m\u001B[38;5;28;01mFalse\u001B[39;00m)\n",
      "Cell \u001B[1;32mIn[68], line 34\u001B[0m, in \u001B[0;36m<lambda>\u001B[1;34m(x)\u001B[0m\n\u001B[0;32m     32\u001B[0m \t\u001B[38;5;28;01mreturn\u001B[39;00m pd\u001B[38;5;241m.\u001B[39mSeries(status,index\u001B[38;5;241m=\u001B[39mcolumns_month)\n\u001B[0;32m     33\u001B[0m \u001B[38;5;66;03m# apply 传递的行\u001B[39;00m\n\u001B[1;32m---> 34\u001B[0m pivoted_purchase_status \u001B[38;5;241m=\u001B[39m pivoted_purchase\u001B[38;5;241m.\u001B[39mapply(\u001B[38;5;28;01mlambda\u001B[39;00m x:\u001B[43mactive_status\u001B[49m\u001B[43m(\u001B[49m\u001B[43mx\u001B[49m\u001B[43m)\u001B[49m,axis\u001B[38;5;241m=\u001B[39m\u001B[38;5;241m1\u001B[39m)\n\u001B[0;32m     35\u001B[0m pivoted_purchase_status\n",
      "Cell \u001B[1;32mIn[68], line 9\u001B[0m, in \u001B[0;36mactive_status\u001B[1;34m(data)\u001B[0m\n\u001B[0;32m      6\u001B[0m status \u001B[38;5;241m=\u001B[39m[]\n\u001B[0;32m      7\u001B[0m \u001B[38;5;28;01mfor\u001B[39;00m i \u001B[38;5;129;01min\u001B[39;00m \u001B[38;5;28mrange\u001B[39m(\u001B[38;5;241m11\u001B[39m):  \u001B[38;5;66;03m# 遍历0-10\u001B[39;00m\n\u001B[0;32m      8\u001B[0m \t\u001B[38;5;66;03m#若本月没有消费\u001B[39;00m\n\u001B[1;32m----> 9\u001B[0m \t\u001B[38;5;28;01mif\u001B[39;00m \u001B[43mdata\u001B[49m\u001B[43m[\u001B[49m\u001B[43mi\u001B[49m\u001B[43m]\u001B[49m \u001B[38;5;241m==\u001B[39m\u001B[38;5;241m0\u001B[39m:\n\u001B[0;32m     10\u001B[0m \t\t\u001B[38;5;66;03m# 列表中有状态信息，\u001B[39;00m\n\u001B[0;32m     11\u001B[0m \t\t\u001B[38;5;28;01mif\u001B[39;00m \u001B[38;5;28mlen\u001B[39m(status)\u001B[38;5;241m>\u001B[39m\u001B[38;5;241m0\u001B[39m:\n\u001B[0;32m     12\u001B[0m \t\t\t\u001B[38;5;66;03m# 若上一个取值为未注册，那么，当前月份的状态也是“未注册”\u001B[39;00m\n\u001B[0;32m     13\u001B[0m \t\t\t\u001B[38;5;28;01mif\u001B[39;00m status[i\u001B[38;5;241m-\u001B[39m\u001B[38;5;241m1\u001B[39m]\u001B[38;5;241m==\u001B[39m\u001B[38;5;124m'\u001B[39m\u001B[38;5;124munreg\u001B[39m\u001B[38;5;124m'\u001B[39m:\n",
      "File \u001B[1;32mF:\\python38\\lib\\site-packages\\pandas\\core\\series.py:958\u001B[0m, in \u001B[0;36mSeries.__getitem__\u001B[1;34m(self, key)\u001B[0m\n\u001B[0;32m    955\u001B[0m     \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_values[key]\n\u001B[0;32m    957\u001B[0m \u001B[38;5;28;01melif\u001B[39;00m key_is_scalar:\n\u001B[1;32m--> 958\u001B[0m     \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43m_get_value\u001B[49m\u001B[43m(\u001B[49m\u001B[43mkey\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m    960\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m is_hashable(key):\n\u001B[0;32m    961\u001B[0m     \u001B[38;5;66;03m# Otherwise index.get_value will raise InvalidIndexError\u001B[39;00m\n\u001B[0;32m    962\u001B[0m     \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[0;32m    963\u001B[0m         \u001B[38;5;66;03m# For labels that don't resolve as scalars like tuples and frozensets\u001B[39;00m\n",
      "File \u001B[1;32mF:\\python38\\lib\\site-packages\\pandas\\core\\series.py:1069\u001B[0m, in \u001B[0;36mSeries._get_value\u001B[1;34m(self, label, takeable)\u001B[0m\n\u001B[0;32m   1066\u001B[0m     \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_values[label]\n\u001B[0;32m   1068\u001B[0m \u001B[38;5;66;03m# Similar to Index.get_value, but we do not fall back to positional\u001B[39;00m\n\u001B[1;32m-> 1069\u001B[0m loc \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mindex\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mget_loc\u001B[49m\u001B[43m(\u001B[49m\u001B[43mlabel\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m   1070\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mindex\u001B[38;5;241m.\u001B[39m_get_values_for_loc(\u001B[38;5;28mself\u001B[39m, loc, label)\n",
      "File \u001B[1;32mF:\\python38\\lib\\site-packages\\pandas\\core\\indexes\\base.py:3623\u001B[0m, in \u001B[0;36mIndex.get_loc\u001B[1;34m(self, key, method, tolerance)\u001B[0m\n\u001B[0;32m   3621\u001B[0m     \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_engine\u001B[38;5;241m.\u001B[39mget_loc(casted_key)\n\u001B[0;32m   3622\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m \u001B[38;5;167;01mKeyError\u001B[39;00m \u001B[38;5;28;01mas\u001B[39;00m err:\n\u001B[1;32m-> 3623\u001B[0m     \u001B[38;5;28;01mraise\u001B[39;00m \u001B[38;5;167;01mKeyError\u001B[39;00m(key) \u001B[38;5;28;01mfrom\u001B[39;00m \u001B[38;5;21;01merr\u001B[39;00m\n\u001B[0;32m   3624\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m \u001B[38;5;167;01mTypeError\u001B[39;00m:\n\u001B[0;32m   3625\u001B[0m     \u001B[38;5;66;03m# If we have a listlike key, _check_indexing_error will raise\u001B[39;00m\n\u001B[0;32m   3626\u001B[0m     \u001B[38;5;66;03m#  InvalidIndexError. Otherwise we fall through and re-raise\u001B[39;00m\n\u001B[0;32m   3627\u001B[0m     \u001B[38;5;66;03m#  the TypeError.\u001B[39;00m\n\u001B[0;32m   3628\u001B[0m     \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_check_indexing_error(key)\n",
      "\u001B[1;31mKeyError\u001B[0m: 0"
     ]
    }
   ],
   "source": [
    "# applymap: DataFrame专有, 其中的x是DataFrame中每个元素\n",
    "# map()函数: 适合处理某一单独的列\n",
    "#apply()函数：既支持 Series 每一个元素，也支持 DataFrame  传递的行或列 ,默认传递列\n",
    "def active_status(data):\n",
    "#存储当前用户的状态信息，如：unreg→未注册；unactive→未激活；new→新用户；return→回流\n",
    "\tstatus =[]\n",
    "\tfor i in range(11):  # 遍历0-10\n",
    "\t\t#若本月没有消费\n",
    "\t\tif data[i] ==0:\n",
    "\t\t\t# 列表中有状态信息，\n",
    "\t\t\tif len(status)>0:\n",
    "\t\t\t\t# 若上一个取值为未注册，那么，当前月份的状态也是“未注册”\n",
    "\t\t\t\tif status[i-1]=='unreg':\n",
    "\t\t\t\t\tstatus.append('unreg')\n",
    "\t\t\t\telse:\n",
    "\t\t\t\t\tstatus.append('unactive')\n",
    "\t\t\t# 列表中没有状态信息\n",
    "\t\t\telse:\n",
    "\t\t\t\t#将用户的状态置为“未注册”\n",
    "\t\t\t\tstatus.append('unreg')\n",
    "\t\t\t#若本月消费\n",
    "\t\telse:\n",
    "\t\t\tif len(status)==0:\n",
    "\t\t\t\tstatus.append('new')\n",
    "\t\t\telse:\n",
    "\t\t\t\tif status[i-1]=='unactive':\n",
    "\t\t\t\t\tstatus.append('return')\n",
    "\t\t\t\telif status[i-1]=='unreg':\n",
    "\t\t\t\t\tstatus.append('new')\n",
    "\t\t\t\telse:\n",
    "\t\t\t\t\tstatus.append('active')\n",
    "\treturn pd.Series(status,index=columns_month)\n",
    "# apply 传递的行\n",
    "pivoted_purchase_status = pivoted_purchase.apply(lambda x:active_status(x),axis=1)\n",
    "pivoted_purchase_status"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "purchase_status_counts_tmp= pivoted_purchase_status.replace('unreg',np.NaN)\n",
    "purchase_status_counts_tmp"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "purchase_status_counts=purchase_status_counts_tmp.apply(lambda x:pd.value_counts(x))\n",
    "purchase_status_counts\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "purchase_status_counts_data = purchase_status_counts.fillna(0).T\n",
    "purchase_status_counts_data\n",
    "\n",
    "purchase_status_counts_data.loc[:,\"active\":\"new\"]\n",
    "active_data = purchase_status_counts_data[\"active\"]\n",
    "new_data = purchase_status_counts_data[\"new\"]\n",
    "active_data\n",
    "new_data"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "fig = plt.figure(figsize=(8, 5))\n",
    "plt.figure(dpi=100)\n",
    "plt.stackplot(active_data.index, active_data.values, alpha=0.8)\n",
    "plt.stackplot(new_data.index, new_data.values, alpha=0.8)\n",
    "plt.show()"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "outputs": [
    {
     "data": {
      "text/plain": "     Unnamed: 0                event_time             order_id  \\\n0             0 2020-04-24 11:50:39+00:00  2294359932054536986   \n1             1 2020-04-24 11:50:39+00:00  2294359932054536986   \n2             2 2020-04-24 14:37:43+00:00  2294444024058086220   \n3             3 2020-04-24 14:37:43+00:00  2294444024058086220   \n4             4 2020-04-24 19:16:21+00:00  2294584263154074236   \n..          ...                       ...                  ...   \n995         995 2020-05-01 06:13:19+00:00  2299263580689662910   \n996         996 2020-05-01 06:14:11+00:00  2299264013382452202   \n997         997 2020-05-01 06:15:29+00:00  2299264670051074093   \n998         998 2020-05-01 06:16:16+00:00  2299265061060870223   \n999         999 2020-05-01 06:16:45+00:00  2299265304112398434   \n\n              product_id   category_id                category_code     brand  \\\n0    1515966223509089906  2.268105e+18           electronics.tablet   samsung   \n1    1515966223509089906  2.268105e+18           electronics.tablet   samsung   \n2    2273948319057183658  2.268105e+18  electronics.audio.headphone    huawei   \n3    2273948319057183658  2.268105e+18  electronics.audio.headphone    huawei   \n4    2273948316817424439  2.268105e+18                      missing   karcher   \n..                   ...           ...                          ...       ...   \n995  1515966223509259066  2.268105e+18    appliances.kitchen.washer      beko   \n996  1515966223509127712  2.268105e+18     computers.network.router  mercusys   \n997  1515966223509088532  2.268105e+18       electronics.smartphone   samsung   \n998  1515966223509088671  2.268105e+18       electronics.smartphone     apple   \n999  1515966223509108006  2.268105e+18       electronics.smartphone    xiaomi   \n\n      price       user_id   age sex local age_box  month  \n0    162.01  1.515916e+18  24.0   女    海南      青年      4  \n1    162.01  1.515916e+18  24.0   女    海南      青年      4  \n2     77.52  1.515916e+18  38.0   女    北京      青年      4  \n3     77.52  1.515916e+18  38.0   女    北京      青年      4  \n4    217.57  1.515916e+18  32.0   女    广东      青年      4  \n..      ...           ...   ...  ..   ...     ...    ...  \n995  203.68  1.515916e+18  49.0   男    广东      中年      5  \n996   16.88  1.515916e+18  24.0   男    广东      青年      5  \n997  300.90  1.515916e+18  28.0   女    北京      青年      5  \n998  925.67  1.515916e+18  20.0   男    上海      年轻      5  \n999  110.86  1.515916e+18  37.0   女    湖南      青年      5  \n\n[1000 rows x 14 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Unnamed: 0</th>\n      <th>event_time</th>\n      <th>order_id</th>\n      <th>product_id</th>\n      <th>category_id</th>\n      <th>category_code</th>\n      <th>brand</th>\n      <th>price</th>\n      <th>user_id</th>\n      <th>age</th>\n      <th>sex</th>\n      <th>local</th>\n      <th>age_box</th>\n      <th>month</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>0</td>\n      <td>2020-04-24 11:50:39+00:00</td>\n      <td>2294359932054536986</td>\n      <td>1515966223509089906</td>\n      <td>2.268105e+18</td>\n      <td>electronics.tablet</td>\n      <td>samsung</td>\n      <td>162.01</td>\n      <td>1.515916e+18</td>\n      <td>24.0</td>\n      <td>女</td>\n      <td>海南</td>\n      <td>青年</td>\n      <td>4</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>1</td>\n      <td>2020-04-24 11:50:39+00:00</td>\n      <td>2294359932054536986</td>\n      <td>1515966223509089906</td>\n      <td>2.268105e+18</td>\n      <td>electronics.tablet</td>\n      <td>samsung</td>\n      <td>162.01</td>\n      <td>1.515916e+18</td>\n      <td>24.0</td>\n      <td>女</td>\n      <td>海南</td>\n      <td>青年</td>\n      <td>4</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>2</td>\n      <td>2020-04-24 14:37:43+00:00</td>\n      <td>2294444024058086220</td>\n      <td>2273948319057183658</td>\n      <td>2.268105e+18</td>\n      <td>electronics.audio.headphone</td>\n      <td>huawei</td>\n      <td>77.52</td>\n      <td>1.515916e+18</td>\n      <td>38.0</td>\n      <td>女</td>\n      <td>北京</td>\n      <td>青年</td>\n      <td>4</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>3</td>\n      <td>2020-04-24 14:37:43+00:00</td>\n      <td>2294444024058086220</td>\n      <td>2273948319057183658</td>\n      <td>2.268105e+18</td>\n      <td>electronics.audio.headphone</td>\n      <td>huawei</td>\n      <td>77.52</td>\n      <td>1.515916e+18</td>\n      <td>38.0</td>\n      <td>女</td>\n      <td>北京</td>\n      <td>青年</td>\n      <td>4</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>4</td>\n      <td>2020-04-24 19:16:21+00:00</td>\n      <td>2294584263154074236</td>\n      <td>2273948316817424439</td>\n      <td>2.268105e+18</td>\n      <td>missing</td>\n      <td>karcher</td>\n      <td>217.57</td>\n      <td>1.515916e+18</td>\n      <td>32.0</td>\n      <td>女</td>\n      <td>广东</td>\n      <td>青年</td>\n      <td>4</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>995</th>\n      <td>995</td>\n      <td>2020-05-01 06:13:19+00:00</td>\n      <td>2299263580689662910</td>\n      <td>1515966223509259066</td>\n      <td>2.268105e+18</td>\n      <td>appliances.kitchen.washer</td>\n      <td>beko</td>\n      <td>203.68</td>\n      <td>1.515916e+18</td>\n      <td>49.0</td>\n      <td>男</td>\n      <td>广东</td>\n      <td>中年</td>\n      <td>5</td>\n    </tr>\n    <tr>\n      <th>996</th>\n      <td>996</td>\n      <td>2020-05-01 06:14:11+00:00</td>\n      <td>2299264013382452202</td>\n      <td>1515966223509127712</td>\n      <td>2.268105e+18</td>\n      <td>computers.network.router</td>\n      <td>mercusys</td>\n      <td>16.88</td>\n      <td>1.515916e+18</td>\n      <td>24.0</td>\n      <td>男</td>\n      <td>广东</td>\n      <td>青年</td>\n      <td>5</td>\n    </tr>\n    <tr>\n      <th>997</th>\n      <td>997</td>\n      <td>2020-05-01 06:15:29+00:00</td>\n      <td>2299264670051074093</td>\n      <td>1515966223509088532</td>\n      <td>2.268105e+18</td>\n      <td>electronics.smartphone</td>\n      <td>samsung</td>\n      <td>300.90</td>\n      <td>1.515916e+18</td>\n      <td>28.0</td>\n      <td>女</td>\n      <td>北京</td>\n      <td>青年</td>\n      <td>5</td>\n    </tr>\n    <tr>\n      <th>998</th>\n      <td>998</td>\n      <td>2020-05-01 06:16:16+00:00</td>\n      <td>2299265061060870223</td>\n      <td>1515966223509088671</td>\n      <td>2.268105e+18</td>\n      <td>electronics.smartphone</td>\n      <td>apple</td>\n      <td>925.67</td>\n      <td>1.515916e+18</td>\n      <td>20.0</td>\n      <td>男</td>\n      <td>上海</td>\n      <td>年轻</td>\n      <td>5</td>\n    </tr>\n    <tr>\n      <th>999</th>\n      <td>999</td>\n      <td>2020-05-01 06:16:45+00:00</td>\n      <td>2299265304112398434</td>\n      <td>1515966223509108006</td>\n      <td>2.268105e+18</td>\n      <td>electronics.smartphone</td>\n      <td>xiaomi</td>\n      <td>110.86</td>\n      <td>1.515916e+18</td>\n      <td>37.0</td>\n      <td>女</td>\n      <td>湖南</td>\n      <td>青年</td>\n      <td>5</td>\n    </tr>\n  </tbody>\n</table>\n<p>1000 rows × 14 columns</p>\n</div>"
     },
     "execution_count": 86,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rs = df.groupby(['sex', 'age_box']).apply(lambda x: x['order_id'].nunique() / x['user_id'].nunique())\n",
    "rs\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "data6 = df.groupby(['sex','age_box',\"brand\"])[\"order_id\"].count()\n",
    "data6 = data6.unstack()\n",
    "data6"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "data7 = df.groupby(['sex', 'age_box'])[\"order_id\"].count()\n",
    "data7 = data7.unstack()\n",
    "data7"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "# for i in data7.index:\n",
    "# \tfor j in data7.columns:\n",
    "# \t\tprint(data7.loc[i,j])\n",
    "d = {}\n",
    "\n",
    "for index,k in enumerate(data6.index):\n",
    "\t\tdata = data6.iloc[index].to_frame()\n",
    "\t\tall_person = data7.loc[k[0],k[1]]\n",
    "\t\tl = []\n",
    "\t\tfor pos,j in enumerate(data.values):\n",
    "\t\t\td1={}\n",
    "\t\t\td1[data.index[pos]] =float( j/all_person)\n",
    "\t\t\tl.append(d1)\n",
    "\t\td[k] = l\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "d2= {}\n",
    "for k,v in d.items():\n",
    "\td2[k] = v[:5]\n",
    "\n",
    "d2\n",
    "\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "plt.xticks(rotation=90)\n",
    "for k,v in d2.items():\n",
    "\tfor i in v:\n",
    "\t\tfor m,n in i.items():\n",
    "\t\t\tplt.bar(str(k),n,label = m)\n",
    "plt.legend()\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "# 购买次数>2的人/品牌下单的人\n",
    "repurchase_rate = df.groupby('user_id')['brand'].nunique().value_counts(normalize=True)\n",
    "\n",
    "repurchase_rate.plot()\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "data2 = df.groupby([\"user_id\",\"brand\"])[[\"brand\"]].count()\n",
    "data2"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "data3 = data2.loc[data2[\"brand\"]>=2]\n",
    "data3"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "# len(data2.loc[\"apple\",data2[\"brand\"]>=1])\n",
    "selected_rows = data2.xs(\"apple\", level='brand')\n",
    "buy_apple = selected_rows.count()"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "buy_two_apple = data3.xs(\"apple\", level='brand').count()\n",
    "buy_two_apple"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "buy_two_apple/buy_apple"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "price_bins = [0, 1000, 2000, float('inf')]\n",
    "\n",
    "price_lables = ['0-1000', '1000-2000', '2000+']\n",
    "\n",
    "df['price_group'] = pd.cut(df['price'], bins=price_bins, labels=price_lables)\n",
    "\n",
    "rs = df.groupby(['local', 'age_box', 'price_group'])['order_id'].count()\n",
    "\n",
    "rs.unstack(level=0).plot(kind='bar', stacked=True)\n",
    "\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "df[\"hour\"] = df[\"event_time\"].dt.hour\n",
    "rs = df.groupby(['hour', 'local', 'brand'])[['order_id']].count()\n",
    "rs2 = df.groupby(['hour', 'local', 'brand'])[['price']].sum()\n",
    "\n",
    "rs\n",
    "rs2"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "rs3 = rs.merge(rs2,left_index=True,right_index=True)\n",
    "rs3"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "rs3.plot()\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}